<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .con,
        .con1 {
            width: 100px;
            height: 100px;
            background-color: gold;
        }
    </style>
    <script src="./js/jquery-1.12.4.min.js"></script>
    <script>
        $(function () {
            // 绑定事件
            $(".con").bind("click mouseenter mousedown", function (event) {
                console.log("绑定");
                console.log(event.type);//事件的类型

                $(".con").unbind("mouseenter");//解除绑定
            });

            // 绑定只执行一次的事件
            $(".con1").one("click", function () {
                console.log("click one");
            });

        });
    </script>
</head>

<body>


    <div class="con">


    </div>
    <br>
    <br>
    <br>
    <br>
    <br>
    <div class="con1">


    </div>

</body>

</html>